.app {
  height: 100vh;
  display: flex;
  background: var(--color-bg);
}

/* 左侧边栏样式 */
.sidebar {
  width: 280px;
  background: var(--color-bg);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}

.sidebar.hidden {
  transform: translateX(-100%);
}

.sidebar.visible {
  transform: translateX(0);
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sidebar-header {
  padding: 16px;
  border-bottom: 1px solid var(--color-border);
}

.new-session-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-soft) 100%);
  color: white;
  border: none;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}

.new-session-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--color-primary-strong) 0%, var(--color-primary) 100%);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px var(--primary-a30);
}

.new-session-btn:disabled {
  background: var(--color-soft);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.sessions-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.loading-sessions {
  text-align: center;
  padding: 20px;
  color: var(--color-muted);
  font-size: 14px;
}

.session-item {
  display: flex;
  align-items: center;
  padding: 12px;
  margin-bottom: 4px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  background: transparent;
}

.session-item:hover {
  background: transparent;
  border: none;
}

.session-item.active {
  background: transparent;
  border: none;
}

.session-content {
  flex: 1;
  min-width: 0;
}

.session-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.session-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.session-time {
  font-size: 12px;
  color: var(--color-muted);
}

.session-title-input {
  width: 100%;
  border: 1px solid var(--color-primary);
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 14px;
  outline: none;
}

.session-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.session-item:hover .session-actions {
  opacity: 1;
}

.edit-btn, .delete-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  font-size: 12px;
  transition: background 0.2s ease;
}

.edit-btn:hover {
  background: rgba(0, 0, 0, 0.04);
}

.delete-btn:hover {
  background: rgba(244, 67, 54, 0.1);
}

.sidebar-toggle {
  background: none;
  border: 1px solid var(--primary-a30);
  color: var(--color-primary);
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s ease;
}

.sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: var(--primary-a50);
}

.header {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(15px);
  padding: 8px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Logo样式已移至layout.css */

.title {
  font-size: 16px;
  font-weight: 500;
  color: var(--color-primary);
}

.subtitle {
  background: var(--color-primary);
  color: white;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}



.user-info {
  color: var(--color-muted);
  font-size: 14px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.chat-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 1400px;
  margin: 0 auto;
  width: 95%;
  background: var(--color-bg);
  border-radius: 20px 20px 0 0;
  margin-top: 16px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--color-border);
}

.messages {
  flex: 1;
  overflow-y: auto;
  padding: 28px 68px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  background: var(--color-bg);
}

.welcome-message {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.welcome-message .message-content {
  max-width: 95%;
  width: 95%;
}

.message {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.message.user {
  flex-direction: row-reverse;
  justify-content: flex-start;
}

.bot-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
  box-shadow: 0 4px 16px var(--primary-a25);
  border: 3px solid var(--color-bg);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bot-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary-strong), var(--color-primary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  color: white;
  box-shadow: 0 4px 16px var(--primary-a25);
  border: 3px solid var(--color-bg);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.message-content {
  max-width: 92%;
  padding: 18px 22px;
  border-radius: 20px;
  line-height: 1.6;
}

/* 机器人消息使用更宽的布局 */
.message.assistant .message-content,
.bot-message {
  max-width: 95%;
}

.user-message {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-strong) 100%);
  color: white;
  padding: 14px 18px;
  border-radius: 20px;
  border-bottom-right-radius: 8px;
  max-width: 70%;
  line-height: 1.5;
  font-size: 15px;
  box-shadow: 0 3px 12px var(--primary-a25);
  word-wrap: break-word;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.user-message:hover {
  box-shadow: 0 6px 20px var(--primary-a35);
  transform: translateY(-2px);
}

.bot-message {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-bottom-left-radius: 8px;
  max-width: 88%;
  width: 88%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.intro-text {
  margin-bottom: 16px;
  color: var(--color-text);
}

.example-queries {
  margin-top: 12px;
}

.example-title {
  font-size: 14px;
  color: var(--color-muted);
  margin-bottom: 8px;
}

.example-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  background: var(--color-primary-soft);
  color: var(--color-primary);
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.tag:hover {
  background: #bbdefb;
}

.stream-item {
  margin-bottom: 16px;
  border-left: 3px solid var(--color-primary);
  padding-left: 12px;
}

.stream-item:last-child {
  margin-bottom: 0;
}

.node-title {
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 8px;
  font-size: 14px;
}

.result-content {
  color: var(--color-text);
  font-size: 14px;
  line-height: 1.6;
}

.result-content > div {
  margin-bottom: 4px;
}

.retrieval-data {
  background: #f5f5f5;
  padding: 8px;
  border-radius: 6px;
  font-size: 12px;
  margin-top: 8px;
  word-break: break-all;
}

.intent-result {
  border-left-color: #34a853;
}

.struct-result {
  border-left-color: #fbbc04;
}

.retrieval-result {
  border-left-color: #ea4335;
}

.error-result {
  border-left-color: #ea4335;
}

.error-result .result-content {
  color: #d93025;
}

.loading {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-muted);
}

.loading::after {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid #e0e0e0;
  border-top: 2px solid var(--color-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.input-area {
  padding: 20px 24px;
  background: white;
  border-top: 1px solid #e8eaed;
}

.input-container {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  background: #f8f9fa;
  border-radius: 24px;
  padding: 12px 16px;
  border: 1px solid #e8eaed;
}

.message-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  resize: none;
  font-size: 14px;
  line-height: 1.5;
  max-height: 120px;
  min-height: 20px;
}

.input-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.voice-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: background 0.2s;
}

.voice-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.send-btn {
  background: var(--color-primary);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 18px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}

.send-btn:hover:not(:disabled) {
  background: #3367d6;
}

.send-btn:disabled {
  background: var(--color-soft);
  cursor: not-allowed;
}

.input-footer {
  text-align: center;
  font-size: 12px;
  color: var(--color-muted);
  margin-top: 8px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .chat-container {
    margin-top: 0;
    border-radius: 0;
  }
  
  .message-content {
    max-width: 85%;
  }
  
  .header {
    padding: 8px 16px;
  }
  
  .messages {
    padding: 16px;
  }
  
  .input-area {
    padding: 16px;
  }
}
/* 新
的响应区域样式 */
.response-section {
  margin-bottom: 20px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  font-weight: 600;
  font-size: 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.section-icon {
  font-size: 16px;
}

.section-title {
  color: var(--color-primary);
}

.section-content {
  padding: 16px;
}

/* 指标检索结果的内容区域减少上边距 */
.retrieval-section .section-content {
  padding: 8px 16px 16px 16px;
}

/* 意图识别样式 */
.intent-section {
  background: linear-gradient(135deg, #e8f5e8 0%, #f1f8e9 100%);
}

.intent-section .section-header {
  background: rgba(76, 175, 80, 0.1);
}

.intent-result {
  color: #2e7d32;
  font-weight: 500;
}

/* 结构化提取样式 */
.struct-section {
  background: linear-gradient(135deg, #fff3e0 0%, #fce4ec 100%);
}

.struct-section .section-header {
  background: rgba(255, 152, 0, 0.1);
}

.struct-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.struct-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.struct-label {
  font-size: 12px;
  color: var(--color-muted);
  font-weight: 500;
}

.struct-value {
  color: #e65100;
  font-weight: 500;
  background: rgba(255, 152, 0, 0.1);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 13px;
}

/* 数据检索样式 */
.retrieval-section {
  background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
}

.retrieval-section .section-header {
  background: rgba(33, 150, 243, 0.1);
}

.explanation-box {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(33, 150, 243, 0.2);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.explanation-title {
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 8px;
  font-size: 14px;
}

.explanation-content {
  line-height: 1.6;
  color: var(--color-text);
  font-size: 14px;
}

.data-summary {
  background: rgba(255, 255, 255, 0.6);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 16px;
}

.summary-title {
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 8px;
  font-size: 13px;
}

.summary-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px;
  background: rgba(33, 150, 243, 0.05);
  border-radius: 4px;
}

.stat-label {
  font-size: 12px;
  color: var(--color-muted);
}

.stat-value {
  font-weight: 600;
  color: var(--color-primary);
  font-size: 12px;
}

.raw-data {
  background: rgba(255, 255, 255, 0.4);
  border-radius: 8px;
  padding: 12px;
}

.raw-data-title {
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 8px;
  font-size: 13px;
}

.raw-data-content {
  font-size: 12px;
  line-height: 1.5;
  color: #555;
  background: rgba(0, 0, 0, 0.02);
  padding: 8px;
  border-radius: 4px;
  word-break: break-all;
  max-height: 120px;
  overflow-y: auto;
}

/* 欢迎消息样式更新 */
.greeting-text {
  color: var(--color-text);
  margin-bottom: 16px;
  font-size: 14px;
}

.session-info {
  font-size: 12px;
  color: var(--color-muted);
  margin-top: 8px;
  padding: 4px 8px;
  background: transparent;
  border-radius: 4px;
  font-family: monospace;
}

.info-sections {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.info-section {
  line-height: 1.6;
  font-size: 13px;
}

.info-label {
  background: var(--color-primary-soft);
  color: var(--color-primary);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.info-link {
  color: #2196f3;
  text-decoration: none;
  font-weight: 500;
}

.info-link:hover {
  text-decoration: underline;
}

.info-text {
  color: #555;
}

/* 功能标签页样式 */
.function-tabs {
  display: flex;
  gap: 8px;
  padding: 12px 16px 0;
  align-items: center;
}

.tab-btn {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(33, 150, 243, 0.2);
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--color-muted);
}

.tab-btn.active {
  background: var(--color-primary);
  color: white;
  border-color: #2196f3;
}

.tab-btn:hover:not(.active) {
  background: rgba(33, 150, 243, 0.1);
  border-color: rgba(33, 150, 243, 0.3);
}

.clear-btn {
  background: rgba(244, 67, 54, 0.1);
  border: 1px solid rgba(244, 67, 54, 0.2);
  color: #f44336;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  margin-left: auto;
}

.clear-btn:hover {
  background: rgba(244, 67, 54, 0.2);
}

/* 输入区域更新 */
.input-container {
  margin: 8px 16px 0;
}

.action-btn {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: background 0.2s;
}

.action-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.send-btn {
  background: var(--color-primary);
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.2s;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.send-btn:hover:not(:disabled) {
  background: #1976d2;
}

.input-footer {
  font-size: 11px;
  color: #999;
  text-align: center;
  margin-top: 8px;
  padding-bottom: 12px;
}

/* 错误样式 */
.error-section {
  background: linear-gradient(135deg, #ffebee 0%, #fce4ec 100%);
}

.error-section .section-header {
  background: rgba(244, 67, 54, 0.1);
}

.error-message {
  color: #d32f2f;
  font-weight: 500;
}
* 数据列表容器样式 */
.data-list-container {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
  border: 1px solid rgba(33, 150, 243, 0.1);
}

.data-list-title {
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 12px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.data-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 400px;
  overflow-y: auto;
}

/* 数据项卡片样式 */
.data-item-card {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(33, 150, 243, 0.15);
  border-radius: 8px;
  padding: 12px;
  transition: all 0.2s ease;
}

.data-item-card:hover {
  border-color: rgba(33, 150, 243, 0.3);
  box-shadow: 0 2px 8px rgba(33, 150, 243, 0.1);
}

.data-item-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.data-item-number {
  background: var(--color-primary);
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}

.data-item-name {
  font-weight: 600;
  color: var(--color-primary);
  font-size: 13px;
  line-height: 1.4;
}

.data-item-indicators {
  margin-top: 8px;
}

.indicators-title {
  font-size: 12px;
  color: var(--color-muted);
  margin-bottom: 6px;
  font-weight: 500;
}

.indicators-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.indicator-tag {
  background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
  color: var(--color-primary);
  padding: 2px 6px;
  border-radius: 12px;
  font-size: 11px;
  border: 1px solid rgba(33, 150, 243, 0.2);
  white-space: nowrap;
  transition: all 0.2s ease;
}

.indicator-tag:hover {
  background: linear-gradient(135deg, #bbdefb 0%, #e1bee7 100%);
  border-color: rgba(33, 150, 243, 0.4);
}

/* 滚动条样式 */
.data-list::-webkit-scrollbar {
  width: 6px;
}

.data-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 3px;
}

.data-list::-webkit-scrollbar-thumb {
  background: rgba(33, 150, 243, 0.3);
  border-radius: 3px;
}

.data-list::-webkit-scrollbar-thumb:hover {
  background: rgba(33, 150, 243, 0.5);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .data-item-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  
  .data-item-name {
    font-size: 12px;
  }
  
  .indicators-list {
    gap: 3px;
  }
  
  .indicator-tag {
    font-size: 10px;
    padding: 1px 4px;
  }
  
  .data-list {
    max-height: 300px;
  }
}

/* 原始数据区域调整 */
.raw-data {
  background: rgba(248, 249, 250, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.raw-data-title {
  color: var(--color-muted);
  font-size: 12px;
}

.raw-data-content {
  font-size: 11px;
  color: #777;
  max-height: 80px;
}/* 
时间戳样式 */
.timestamp {
  font-size: 11px;
  color: #999;
  margin-left: auto;
  font-weight: normal;
}

/* 相似度徽章 */
.similarity-badge {
  background: linear-gradient(135deg, #4caf50 0%, #8bc34a 100%);
  color: white;
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  margin-left: auto;
}

/* 项目详情样式 */
.data-item-details {
  margin: 8px 0;
  padding: 8px;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 4px;
}

.detail-row {
  display: flex;
  margin-bottom: 4px;
}

.detail-row:last-child {
  margin-bottom: 0;
}

.detail-label {
  font-size: 11px;
  color: var(--color-muted);
  min-width: 70px;
  font-weight: 500;
}

.detail-value {
  font-size: 11px;
  color: var(--color-text);
  flex: 1;
}

/* 表格信息样式 */
.table-info {
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.table-title {
  font-size: 12px;
  color: var(--color-muted);
  margin-bottom: 6px;
  font-weight: 500;
}

.table-item {
  background: rgba(33, 150, 243, 0.05);
  border: 1px solid rgba(33, 150, 243, 0.1);
  border-radius: 4px;
  padding: 6px 8px;
  margin-bottom: 4px;
}

.table-item:last-child {
  margin-bottom: 0;
}

.table-name {
  font-size: 11px;
  color: var(--color-primary);
  font-weight: 500;
  margin-bottom: 2px;
  line-height: 1.3;
}

.table-indicators {
  font-size: 10px;
  color: var(--color-muted);
}

/* 数据项卡片增强 */
.data-item-card {
  position: relative;
  overflow: hidden;
}

.data-item-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(135deg, #2196f3 0%, #21cbf3 100%);
}

/* 指标标签增强 */
.indicator-tag {
  position: relative;
  overflow: hidden;
}

.indicator-tag::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.5s;
}

.indicator-tag:hover::before {
  left: 100%;
}

/* 响应式优化 */
@media (max-width: 768px) {
  .similarity-badge {
    font-size: 9px;
    padding: 1px 4px;
  }
  
  .table-name {
    font-size: 10px;
  }
  
  .table-indicators {
    font-size: 9px;
  }
  
  .detail-label {
    min-width: 60px;
    font-size: 10px;
  }
  
  .detail-value {
    font-size: 10px;
  }
}

/* 加载动画增强 */
.loading {
  position: relative;
}

.loading::before {
  content: '';
  position: absolute;
  left: -100%;
  top: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(33, 150, 243, 0.1), transparent);
  animation: loading-shimmer 2s infinite;
}

@keyframes loading-shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}/* 
项目网格容器样式 */
.items-grid-container {
  margin-top: 4px;
}

.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  padding: 8px 0;
}

/* 项目卡片样式已移至 sections.css */

/* 以上样式已移至 sections.css */

/* React管理的提示框样式 */
.react-tooltip {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(33, 150, 243, 0.3);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
  max-width: 400px;
  min-width: 300px;
  padding: 0;
  overflow: hidden;
  pointer-events: auto;
  transform: translateZ(0);
  will-change: transform;
  transition: none;
}

/* 项目卡片样式已统一在 sections.css 中管理 */

/* 保留旧的提示框样式作为备用 */
.item-tooltip {
  position: fixed;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(33, 150, 243, 0.3);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
  z-index: 1000;
  max-width: 400px;
  min-width: 300px;
  padding: 0;
  overflow: hidden;
  pointer-events: none;
  animation: tooltipFadeIn 0.2s ease-out;
}

@keyframes tooltipFadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tooltip-header {
  background: linear-gradient(135deg, #2196f3 0%, #21cbf3 100%);
  color: white;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.tooltip-similarity {
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 6px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
}

.tooltip-content {
  padding: 16px;
  max-height: 300px;
  overflow-y: auto;
}

.tooltip-table {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.tooltip-table:last-child {
  margin-bottom: 0;
  border-bottom: none;
  padding-bottom: 0;
}

.tooltip-table-name {
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 8px;
  font-size: 12px;
  line-height: 1.4;
}

.tooltip-columns {
  font-size: 11px;
  color: var(--color-muted);
}

.tooltip-columns strong {
  display: block;
  margin-bottom: 6px;
  color: var(--color-text);
}

.tooltip-column {
  display: inline-block;
  background: rgba(33, 150, 243, 0.1);
  color: var(--color-primary);
  padding: 2px 6px;
  border-radius: 4px;
  margin: 2px 4px 2px 0;
  font-size: 10px;
  border: 1px solid rgba(33, 150, 243, 0.2);
}

/* 滚动条样式 */
.tooltip-content::-webkit-scrollbar {
  width: 4px;
}

.tooltip-content::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 2px;
}

.tooltip-content::-webkit-scrollbar-thumb {
  background: rgba(33, 150, 243, 0.3);
  border-radius: 2px;
}

.tooltip-content::-webkit-scrollbar-thumb:hover {
  background: rgba(33, 150, 243, 0.5);
}

/* 响应式设计 */
@media (max-width: 1200px) {
  .chat-container {
    width: 98%;
    max-width: none;
  }
  
  .bot-message,
  .welcome-message .message-content {
    max-width: 90%;
    width: 90%;
  }
  
  .items-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 6px;
  }
}

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    width: 260px;
  }
  
  .sidebar.hidden {
    transform: translateX(-100%);
  }
  
  .main-content {
    width: 100%;
  }
  
  .chat-container {
    margin-top: 0;
    border-radius: 0;
    width: 100%;
  }
  
  .header {
    padding: 6px 16px;
  }
  
  .header-right {
    gap: 8px;
  }
  
  .sidebar-toggle {
    padding: 4px 8px;
    font-size: 14px;
  }
  
  .user-info {
    display: none;
  }
  
  .message-content {
    max-width: 90%;
  }
  
  .bot-message,
  .welcome-message .message-content {
    max-width: 92%;
    width: 92%;
  }
  
  .user-message {
    max-width: 80%;
    padding: 10px 14px;
    font-size: 13px;
  }
  
  .user-avatar,
  .bot-avatar {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
  
  .items-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 6px;
  }
}

/* 项目卡片动画效果已简化 *//* 
大屏幕优化 */
@media (min-width: 1400px) {
  .items-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
  }
  
  /* 项目卡片样式已在 sections.css 中统一管理 */
}

/* 超大屏幕优化 */
@media (min-width: 1600px) {
  .chat-container {
    max-width: 1600px;
  }
  
  .items-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
  }
}/* 悬浮提
示框样式 */
.item-tooltip {
    position: fixed;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(33, 150, 243, 0.3);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    z-index: 1000;
    max-width: 400px;
    min-width: 300px;
    padding: 0;
    overflow: hidden;
    pointer-events: none;
    animation: tooltipFadeIn 0.2s ease-out;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tooltip-header {
    background: linear-gradient(135deg, #2196f3 0%, #21cbf3 100%);
    color: white;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 600;
}

.tooltip-content {
    padding: 16px;
    max-height: 300px;
    overflow-y: auto;
}

.tooltip-table {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.tooltip-table:last-child {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.tooltip-table-name {
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 8px;
    font-size: 12px;
    line-height: 1.4;
}

.tooltip-columns {
    font-size: 11px;
    color: var(--color-muted);
}

.tooltip-columns strong {
    display: block;
    margin-bottom: 6px;
    color: var(--color-text);
}

.tooltip-column {
    display: inline-block;
    background: rgba(33, 150, 243, 0.1);
    color: var(--color-primary);
    padding: 2px 6px;
    border-radius: 4px;
    margin: 2px 4px 2px 0;
    font-size: 10px;
    border: 1px solid rgba(33, 150, 243, 0.2);
}

/* 滚动条样式 */
.tooltip-content::-webkit-scrollbar {
    width: 4px;
}

.tooltip-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 2px;
}

.tooltip-content::-webkit-scrollbar-thumb {
    background: rgba(33, 150, 243, 0.3);
    border-radius: 2px;
}

.tooltip-content::-webkit-scrollbar-thumb:hover {
    background: rgba(33, 150, 243, 0.5);
}/* 
稳定的悬浮提示框样式 */
.item-tooltip {
    position: fixed;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(33, 150, 243, 0.3);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    z-index: 9999;
    max-width: 400px;
    min-width: 320px;
    max-height: 400px;
    padding: 0;
    overflow: hidden;
    pointer-events: auto;
    animation: tooltipFadeIn 0.2s ease-out;
    transform: translateZ(0);
    will-change: transform;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.tooltip-header {
    background: linear-gradient(135deg, #2196f3 0%, #21cbf3 100%);
    color: white;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px 8px 0 0;
}

.tooltip-title {
    display: block;
    word-break: break-word;
    line-height: 1.4;
}

.tooltip-content {
    padding: 16px;
    max-height: 320px;
    overflow-y: auto;
}

.tooltip-table {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.tooltip-table:last-child {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.tooltip-table-name {
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 8px;
    font-size: 12px;
    line-height: 1.4;
    word-break: break-word;
}

.tooltip-columns {
    font-size: 11px;
    color: var(--color-muted);
}

.tooltip-columns strong {
    display: block;
    margin-bottom: 8px;
    color: var(--color-text);
    font-size: 12px;
}

.tooltip-columns-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.tooltip-column {
    display: inline-block;
    background: rgba(33, 150, 243, 0.1);
    color: var(--color-primary);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    border: 1px solid rgba(33, 150, 243, 0.2);
    white-space: nowrap;
    transition: all 0.2s ease;
}

.tooltip-column:hover {
    background: rgba(33, 150, 243, 0.2);
    border-color: rgba(33, 150, 243, 0.4);
}

.tooltip-no-data {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 20px;
}

/* 滚动条样式 */
.tooltip-content::-webkit-scrollbar {
    width: 6px;
}

.tooltip-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.tooltip-content::-webkit-scrollbar-thumb {
    background: rgba(33, 150, 243, 0.3);
    border-radius: 3px;
}

.tooltip-content::-webkit-scrollbar-thumb:hover {
    background: rgba(33, 150, 243, 0.5);
}

/* 项目卡片样式已在 sections.css 中统一管理 */